<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>玉灵 QQ:7031633 Email:webrx@126.com</title>
    <meta name="keywords" content="keywords">
    <meta name="description" content="description">
    <style>span {
        padding: 6px;
    }</style>
</head>
<body>
<h1>求100以内的素数和</h1>
<script>
    let sum = 0
    for (let i = 2; i <= 100; i++) {
        let num = i
       let f = false
        for (let n = 2; n <= num - 1; n++) {
            if (num % n === 0) {
                f = true
                break
            }
        }
        if(!f){
            sum+=num
            document.write(`<span>${num}</span>`)
        }
    }
    document.write(`<span> = ${sum}</span>`)
</script>
</body>
</html>
